package br.com.guiaturistico;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;


public class SplashActivity extends Activity {
	private int tempoSplash = 3000;
	private Context context = this;
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.splash_layout);

		
		
		Thread thread = new Thread(){
			
			public void run(){
				
				try {
					
					int contador = 0;
					
					while(contador < tempoSplash){
						sleep(100);
						
						contador+=100;
						
					}
					
					
				} catch (InterruptedException e) {
					
					e.printStackTrace();
				}
				finally{
					finish();
					
					startActivity(new Intent(context,HomeNewActivity.class));
					
				}
			}
		};
		
		thread.start();
	}
	
}
